<template>
  <div class="editPurchase">
    <div class="dropdown">
      <el-button size="mini" @click="queryTSalOrderNtry">{{ $t('btn.reload') }}</el-button>
      <el-button size="mini" type="primary" @click="insert">{{ $t('btn.save') }}</el-button>
    </div>
    <el-tabs v-model="activeName" class="tabs" @tab-click="handleClick">
      <el-tab-pane :label="$t('market.info')" name="first">
        <el-form ref="purchaseRef" :model="prodValue" label-width="100px">
          <el-form-item :label="$t('market.state')" prop="fdocumentStatus">
            <el-tag
              :type="prodValue.stateColor"
            >
              {{ prodValue.fdocumentStatus }}
            </el-tag>
          </el-form-item>
          <el-form-item :label="$t('market.billType')" prop="fbillType">
            <el-select
              v-model.trim="prodValue.fbillTypeId"
              size="mini"
              filterable
            >
              <el-option
                v-for="item in billTypeData"
                :key="item.fid"
                :label="item.fname"
                :value="item.fid"
              />
            </el-select>
          </el-form-item>
          <!--          <el-form-item label="采购组织">-->
          <!--            <el-input v-model.trim="prodValue.fpurchaseorg" disabled />-->
          <!--          </el-form-item>-->
          <el-form-item :label="$t('market.billNo')">
            <el-input v-model="prodValue.fbillNo" disabled size="mini" />
          </el-form-item>
          <el-form-item :label="$t('market.purchaseDate')" prop="fdeliveryDate">
            <el-date-picker
              v-model="prodValue.fdate"
              type="date"
              value-format="yyyy-MM-dd"
              size="mini"
              style="width: 163px"
            />
          </el-form-item>
          <el-form-item :label="$t('market.supplier')" prop="fsupplierId">
            <el-autocomplete
              v-model.trim="prodValue.fsupplier"
              highlight-first-item
              popper-class="my-autocomplete"
              :fetch-suggestions="querySearch9"
              size="mini"
              @focus="handleSupplier"
              @select="supplierData"
            >
              <i
                slot="suffix"
                class="el-input__icon el-icon-search"
                @click="supplierVisiblit=true"
              />
              <template slot-scope="{ item }">
                <div class="name">{{ item.fname }}</div>
              </template>
            </el-autocomplete>
          </el-form-item>
          <el-form-item :label="$t('market.purchaser')" prop="fcustId">
            <el-autocomplete
              v-model.trim="prodValue.fpurchaser"
              highlight-first-item
              popper-class="my-autocomplete"
              :fetch-suggestions="querySearch3"
              size="mini"
              @focus="querySalesperson(2)"
              @select="purchaseData"
            >
              <i
                slot="suffix"
                class="el-input__icon el-icon-search"
                @click="purchaseVisiblit=true"
              />
              <template slot-scope="{ item }">
                <div class="name">{{ item.fuserName }}</div>
              </template>
            </el-autocomplete>
          </el-form-item>
          <el-form-item :label="$t('market.note')" prop="fnote">
            <el-input
              v-model.trim="prodValue.fpaezRemarks"
              size="mini"
            />
          </el-form-item>
        </el-form>
        <div style="margin: 10px 0 5px;">
          <el-button size="mini" @click="newLine">{{ $t('btn.newHang') }}<!--新增行--></el-button>
          <el-button size="mini" @click="delHang">{{ $t('btn.delHang') }}<!--删除行--></el-button>
          <el-button size="mini" @click="batchFill">{{ $t('btn.batchFill') }}<!--批量填充--></el-button>
          <el-button size="mini" @click="quotations">{{ $t('btn.quotatins') }}<!--获取单价--></el-button>
          <el-button size="mini" @click="batchFprice">{{ $t('btn.sunPrice') }}<!--计算材料单价--></el-button>
        </div>
        <div>
          <!--明细表格-->
          <jc-table
            :table-data="saleDetails"
            :table-header="tableHeader"
            serial
            :table-height="tableHeight"
            @cellClick="cellClick"
            @rowClick="rowClick"
          >
            <!--物料编码-->
            <template v-slot:text2Slot="col">
              <el-link type="primary" @click="sonJumpMateriel(col.scope.row.fnumber)">
                {{ col.scope.row.fnumber }}
              </el-link>
            </template>
            <!--采购数量-->
            <template v-slot:tagSlot="col">
              <el-input-number
                v-model="col.scope.row.fqty"
                :min="0"
                size="mini"
                @change="fqtyChange(col.scope.$index)"
              />
            </template>
            <!--交货日期-->
            <template v-slot:btnState="col">
              <el-date-picker
                v-model.trim="col.scope.row.fdeliveryDate"
                type="date"
                value-format="yyyy-MM-dd"
                size="mini"
                style="width: 100%"
              />
            </template>
            <!--税率-->
            <template v-slot:btnStates="col">
              <el-input-number
                v-model="col.scope.row.ftaxRate"
                :min="0"
                size="mini"
              />
            </template>
            <!--            &lt;!&ndash;单价&ndash;&gt;-->
            <!--            <template v-slot:text4Slot="col">-->
            <!--              <el-input-number-->
            <!--                v-model="col.scope.row.fprice"-->
            <!--                :min="0"-->
            <!--                size="mini"-->
            <!--                @change="fqtyChange(col.scope.$index)"-->
            <!--              />-->
            <!--            </template>-->
            <!--备注-->
            <template v-slot:text3Slot="col">
              <el-input
                v-model="col.scope.row.fnote"
                size="mini"
              />
            </template>
            <!--上游备注-->
            <template v-slot:btnSlot="col">
              <el-input
                v-model="col.scope.row.fpaezText1"
                size="mini"
              />
            </template>
            <!--客户订单号-->
            <template v-slot:orderSlot="col">
              <el-input
                v-model="col.scope.row.fpaezText"
                size="mini"
              />
            </template>
            <!--库存组织-->
            <template v-slot:billSlot="col">
              <el-select v-model="col.scope.row.fstockorgid">
                <el-option
                  v-for="option in teamList"
                  :key="option.fid"
                  :label="option.fname"
                  :value="option.fid"
                />
              </el-select>
            </template>
            <!--操作-->
            <template v-slot:operaSlot="clo">
              <el-button
                type="danger"
                size="mini"
                @click="handleDelete(clo.scope.$index)"
              >{{ $t('shop.delete') }}
              </el-button>
            </template>
          </jc-table>
        </div>
      </el-tab-pane>
      <el-tab-pane :label="$t('market.fince')" name="two">
        <el-form ref="purchaseRef" :model="prodValue" label-width="100px">
          <!--          <el-form-item label="结算组织">-->
          <!--            <el-input v-model.trim="prodValue.fsettleorg" disabled />-->
          <!--          </el-form-item>-->
          <el-form-item :label="$t('market.settleCurr')" prop="fsettlecurrId">
            <el-autocomplete
              v-model.trim="prodValue.fsettlecurr"
              highlight-first-item
              popper-class="my-autocomplete"
              :fetch-suggestions="querySearch5"
              size="mini"
              @focus="queryTBdCurrency"
              @select="currencyData"
            >
              <i
                slot="suffix"
                class="el-input__icon el-icon-search"
                @click="currencyVisiblit=true"
              />
              <template slot-scope="{ item }">
                <div class="name">{{ item.fname }}</div>
              </template>
            </el-autocomplete>
          </el-form-item>
          <el-form-item :label="$t('market.paymentClause')" prop="fpaycondiTionId">
            <el-autocomplete
              v-model.trim="prodValue.fpaycondiTion"
              highlight-first-item
              popper-class="my-autocomplete"
              :fetch-suggestions="querySearch18"
              size="mini"
              :popper-append-to-body="false"
              @focus="getBasicUnit('SX_PAYCONDITION')"
              @select="selUnit"
            >
              <i
                slot="suffix"
                class="el-input__icon el-icon-search"
                @click="cliUnit('SX_PAYCONDITION')"
              />
              <template slot-scope="{ item }">
                <div class="name">{{ item.fname }}</div>
              </template>
            </el-autocomplete>
          </el-form-item>
          <el-form-item :label="$t('market.settleType')" prop="fsettlemodeId">
            <el-autocomplete
              v-model.trim="prodValue.fsettlemode"
              highlight-first-item
              popper-class="my-autocomplete"
              :fetch-suggestions="querySearch8"
              size="mini"
              @focus="getBasicUnit('SX_SETTLETYPE')"
              @select="selUnit"
            >
              <i
                slot="suffix"
                class="el-input__icon el-icon-search"
                @click="cliUnit('SX_SETTLETYPE')"
              />
              <template slot-scope="{ item }">
                <div class="name">{{ item.fname }}</div>
              </template>
            </el-autocomplete>
          </el-form-item>
          <el-form-item :label="$t('market.exchangeType')">
            <el-input v-model="prodValue.fexchangeType" disabled size="mini" />
          </el-form-item>
          <el-form-item :label="$t('market.localCurr')">
            <el-input v-model="prodValue.flocalcurr" size="mini" disabled />
          </el-form-item>
          <el-form-item :label="$t('market.exchangeRate')">
            <el-input v-model="prodValue.fexchangeRate" disabled size="mini" />
          </el-form-item>
          <el-form-item :label="$t('market.priceList')" prop="fpriceListId">
            <el-select
              v-model.trim="prodValue.fpriceListId"
              size="mini"
              filterable
              @change="quotations"
            >
              <el-option
                v-for="item in fpriceList"
                :key="item.fid"
                :label="item.fname"
                :value="item.fid"
              />
            </el-select>
          </el-form-item>
          <el-form-item :label="$t('market.billamount')">
            <el-input v-model.trim="prodValue.fbillAmount" size="mini" disabled />
          </el-form-item>
          <el-form-item :label="$t('market.billtaxamount')">
            <el-input v-model.trim="prodValue.fbilltaxAmount" size="mini" disabled />
          </el-form-item>
          <el-form-item :label="$t('market.billallamount')">
            <el-input v-model.trim="prodValue.fbillallAmount" size="mini" disabled />
          </el-form-item>
          <el-form-item :label="$t('market.tax')">
            <el-checkbox v-model="prodValue.fisincludedTax" />
          </el-form-item>
        </el-form>
      </el-tab-pane>
    </el-tabs>
    <!--结算币别列表-->
    <currency v-if="currencyVisiblit" @currency="currencyData" />
    <!--供应商-->
    <supplier v-if="supplierVisiblit" :fsettlecurr="prodValue.fsettlecurrId" @supplier="supplierData" />
    <!--采购员-->
    <market v-if="purchaseVisiblit" :staff-type="staffType" @market="purchaseData" />
    <!--  数据字典弹窗  -->
    <unit v-if="unitVisabled" :msg="funit" @unit="selUnit" />
  </div>
</template>
<script>
import {
  queryPriceList, queryPoorderPrice,
  queryMaterialArrayInventory, batchPoorderPrice
} from '@/api/purchaseManagement/purchaseOrder'
import jumpMateriel from '@/components/JumpMateriel'
import mixinsImg from '@/views/market/marketManage/createMarkerOrder/components/mixinsImg'
import { querySalerRate, queryViewItem } from '@/api/marketManage/marketOrder'
import { maxDecimal } from '@/utils/number'
import { toMxAmina } from '@/components/ToMxamineState'
import autocomplete from '@/views/market/marketManage/createMarkerOrder/components/autocomplete'
import bility from '@/mixin/Operability'
import { insertPoorder, insertPurPoorder } from '@/api/purchaseManagement/apply'

export default {
  name: 'MarketPushDown',
  components: {
    currency: () => import('@/views/market/marketManage/createMarkerOrder/components/currency'),
    supplier: () => import('@/views/purchasing/purchase/treePurchasePrice/component/supplier'),
    market: () => import('@/views/market/marketManage/createMarkerOrder/components/market'),
    unit: () => import('@/views/basic/createMateriel2/components/unit')
  },
  mixins: [jumpMateriel, mixinsImg, autocomplete, bility],
  data() {
    return {
      funit: '',
      staffType: 2, // 采购员
      isdanjuDialog: false, // 单据类型
      activeName: 'first', // 基本信息
      activeName1: 'first', // 明细信息
      currencyVisiblit: false, // 结算币别弹窗
      supplierVisiblit: false, // 供应商
      purchaseVisiblit: false, // 采购员
      unitVisabled: false, // 采购员
      isMateria: false, // 物料弹窗
      isPayment: false, // 付款条件
      fpriceList: [], // 价目表
      prodValue: {}, // 表单数据
      tableHeight: 'calc(100vh - 290px)',
      indexSelf: 0,
      saleDetails: [],
      tableHeader: [
        { label: this.$t('market.fmaterial'), prop: 'fnumber', type: 'text2', width: '120px' },
        { label: this.$t('market.fmodel'), prop: 'fmodel' },
        { label: this.$t('shop.fname2'), prop: 'fname' },
        { label: this.$t('shop.fspecificaTion'), prop: 'fspecificaTion' },
        { label: this.$t('market.fdescripTion'), prop: 'fdescripTion', minWidth: '200px' },
        { label: this.$t('market.storageUnit'), prop: 'funit', width: '70' },
        { label: this.$t('market.purchaserQty'), type: 'tag', prop: 'fqty' },
        { label: this.$t('market.instockqty'), prop: 'fstockinqty' },
        { label: this.$t('market.consignDate'), type: 'state', prop: 'fdeliveryDate', minWidth: '120px' },
        { label: this.$t('market.fprice'), prop: 'fprice', width: '70' },
        { label: this.$t('market.billamount'), prop: 'famount', width: '70' },
        { label: this.$t('market.ftaxPrice'), prop: 'ftaxPrice', width: '70' },
        { label: this.$t('market.billallamount'), prop: 'fallAmount', width: '70' },
        { label: this.$t('market.ftaxRate'), type: 'states', prop: 'ftaxRate', width: '80' },
        { label: this.$t('market.billtaxamount'), prop: 'ftaxAmount', width: '80' },
        { label: this.$t('market.note'), type: 'text3', prop: 'fnote' },
        { label: this.$t('market.stockQty'), prop: 'fbaseqty', width: '70' },
        { label: this.$t('market.stockUnit'), prop: 'fstockunit', width: '70' },
        { label: this.$t('market.paezText1'), type: 'order', prop: 'fpaezText' },
        // { label: '库存组织', type: 'bill', prop: 'fstockorg', width: '120' },
        { label: this.$t('market.note1'), type: 'btn', prop: 'fpaezText1' },
        { label: this.$t('market.chargeunit'), prop: 'fpriceunit' },
        { label: this.$t('market.chargeQty'), prop: 'fpriceunitqty' },
        { label: this.$t('market.handle'), type: 'operate', width: '80px' }
      ],
      billTypeData: [],
      pageNum: 1,
      size: 10,
      total: 0
    }
  },
  created() {
    this.purpoorder()
    this.queryTSalOrderNtry() // 获取订单列表数据
    this.tableHeight = window.innerWidth > 1440 ? 'calc(100vh - 290px)' : '66vh'
  },
  methods: {
    // 保存采购订单
    async insert() {
      this.prodValue.details = this.saleDetails
      const DATA = {
        ...this.prodValue,
        fdocumentStatus: 'A'
      }
      await insertPurPoorder(DATA).then(res => {
        if (res.code === 0) {
          // 关闭当前页面
          this.$store.dispatch('tagsView/guanbi', this.$route)
          this.$router.push({
            path: `/editPurchase/${res.data}`
          })
          this.$message({ showClose: true, message: res.message, type: 'success' })
        } else {
          this.$confirm(res.message, '提示', {
            dangerouslyUseHTMLString: true,
            confirmButtonText: '确定',
            cancelButtonText: '取消',
            type: 'warning'
          })
        }
      })
    },
    // 获取订单列表数据
    async queryTSalOrderNtry() {
      const DATA = this.$route.query.id
      insertPoorder(DATA).then(res => {
        if (res.code === 0) {
          this.prodValue = toMxAmina(res.data)
          this.saleDetails = res.data.details
          this.fpriceList = []
          this.fpriceList.push({
            fid: this.prodValue.fpriceListId,
            fname: this.prodValue.fpricelist
          })
          this.prodValue.fbillTypeId = 159
          this.queryMaterial(1)
          // 没有价目表
          if (!this.prodValue.fpriceListId && this.prodValue.fsupplierId) {
            this.queryPriceList()
          }
        } else {
          this.$confirm(res.message, '提示', {
            confirmButtonText: '确定',
            type: 'error'
          })
        }
      })
      // this.prodValue.fdate = new Date().toLocaleDateString().split('/').join('-')
      // this.prodValue.fbusinessType = 'CG'
      // this.prodValue.fbillTypeId = '83d822ca3e374b4ab01e5dd46a0062bd'
    },
    // 采购订单单据
    async purpoorder() {
      const { data: RES } = await queryViewItem({ viewName: 'SX_PUR_POORDER' })
      this.billTypeData = RES.list
    },
    // 通过价目表查询单价和含税单价
    quotations() {
      this.poorder = []
      this.saleDetails.forEach(item => {
        item.fprice = 0
        item.ftaxPrice = 0
        item.ftaxRate = 0
        this.poorder.push({ fmaterialId: item.fmaterialId, funitId: item.funitId })
      })
      const DATA = {
        fpriceListId: this.prodValue.fpriceListId,
        list: this.poorder,
        fsettlecurrId: this.prodValue.fsettlecurrId
      }
      queryPoorderPrice(DATA).then(res => {
        if (res.code === 0) {
          this.prodValue.fsettlecurr = res.data.fcurrency
          this.prodValue.fsettlecurrId = res.data.fcurrencyId
          this.prodValue.fisincludedTax = res.data.fisIncludedTax
          this.saleDetails.map((item, index) => {
            res.data.priceList.forEach(ite => {
              if (item.fmaterialId === ite.fmaterialId) {
                item.fprice = ite.fprice
                item.ftaxPrice = ite.ftaxprice
                item.ftaxRate = ite.ftaxrate
                this.fqtyChange(index)
              }
            })
          })
        } else {
          this.$confirm(res.message, '提示', {
            confirmButtonText: '确定',
            cancelButtonText: '取消',
            type: 'warning'
          })
        }
      })
    },
    // 监听数量
    fqtyChange(index) {
      const item = this.saleDetails[index]
      item.famount = maxDecimal(item.fqty * item.fprice)
      item.fallAmount = maxDecimal(item.fqty * item.ftaxPrice)
      item.ftaxAmount = maxDecimal(item.fqty * (item.ftaxPrice - item.fprice))
    },
    // 获取结算币别数据(子传父)
    currencyData(item) {
      if (item.fsettleCurrId || item.fcurrencyId) {
        this.prodValue.fsettlecurr = item.fsettleCurrIdName || item.fname
        this.prodValue.fsettlecurrId = item.fsettleCurrId || item.fcurrencyId
        this.currencyVisiblit = false
        // 获取汇率
        this.querySalerRate()
      } else {
        this.currencyVisiblit = false
      }
    },
    // 批量单价
    batchFprice() {
      this.batFprice = []
      this.saleDetails.forEach(item => {
        this.batFprice.push({
          fid: this.prodValue.fpriceListId,
          fmaterialIds: item.fmaterialId
        })
      })
      const DATA = this.batFprice
      batchPoorderPrice(DATA).then(res => {
        if (res.code === 0) {
          this.saleDetails.map((item, index) => {
            res.data.forEach(ite => {
              if (item.fnumber === ite.fnumber) {
                item.fprice = ite.fprice
                item.ftaxPrice = ite.ftaxPrice
                item.ftaxRate = ite.ftaxRate
                this.fqtyChange(index)
              }
            })
          })
          this.$message({ showClose: true, message: res.message, type: 'success' })
        } else {
          this.$confirm(res.message, '提示', {
            confirmButtonText: '确定',
            cancelButtonText: '取消',
            type: 'warning'
          })
        }
      })
    },
    // 数据字典弹窗
    cliUnit(ev) {
      this.funit = ev
      this.unitVisabled = true
    },
    // 数据字典选中
    selUnit(ev) {
      if (ev.fid) {
        if (this.funit === 'SX_PAYCONDITION') { // 付款条件
          this.prodValue.fpaycondiTion = ev.fname
          this.prodValue.fpaycondiTionId = ev.fid
        } else if (this.funit === 'SX_SETTLETYPE') { // 结算方式
          this.prodValue.fsettlemode = ev.fname
          this.prodValue.fsettlemodeId = ev.fid
        }
      }
      this.unitVisabled = false
    },
    // 获取供应商
    supplierData(ev) {
      this.gys = true
      if (ev.fsupplierId) {
        this.prodValue.fsupplierId = ev.fsupplierId
        this.prodValue.fsupplier = ev.fname
        this.prodValue.fpaycondiTion = ev.fpaycondiTion
        this.prodValue.fpaycondiTionId = ev.fpaycondiTionId
        this.prodValue.fsettlemode = ev.fsettleType
        this.prodValue.fsettlemodeId = ev.fsettlemodeId
        this.prodValue.fpriceListId = 0 // 清空价目表
        this.queryPriceList()
      }
      this.supplierVisiblit = false
    },
    // 根据供应商查询价目表
    async queryPriceList() {
      const DATA = {
        fsupplierId: this.prodValue.fsupplierId
      }
      await queryPriceList(DATA).then(res => {
        if (res.code === 0) {
          this.fpriceList = res.data
          if (res.data.length > 0) {
            this.prodValue.fpriceListId = res.data[0].fid
            this.prodValue.fsettlecurr = res.data[0].fcurrency
            this.prodValue.fsettlecurrId = res.data[0].fcurrencyId
            this.prodValue.fisincludedTax = res.data[0].fisincludedTax
            if (this.saleDetails.length > 0) {
              this.quotations()
            }
          } else {
            this.saleDetails.forEach(item => {
              item.fprice = 0
              item.ftaxPrice = 0
              item.famount = 0
              item.fallAmount = 0
              item.ftaxRate = 0
              item.ftaxAmount = 0
            })
          }
        }
      })
    },
    // 获取采购员
    purchaseData(ev) {
      if (ev.fuserId) {
        this.prodValue.fpurchaser = ev.fuserName
        this.prodValue.fpurchaserId = ev.fuserId
      }
      this.purchaseVisiblit = false
    },
    // 查询汇率
    async querySalerRate() {
      const DATA = {
        fexchangeTypeId: this.prodValue.fexchangeTypeId,
        fsettleCurrId: this.prodValue.fsettlecurrId,
        flocalCurrId: this.prodValue.flocalcurrId
      }
      const { data: RES } = await querySalerRate(DATA)
      if (RES) {
        this.prodValue.fexchangeRate = Number(RES.fexchangeRate)
      } else {
        this.prodValue.fexchangeRate = 0
      }
    },
    // 查询库存数量
    async queryMaterial() {
      this.fmaterID = []
      this.saleDetails.forEach(item => {
        this.fmaterID.push(item.fmaterialId)
      })
      await queryMaterialArrayInventory(this.fmaterID).then(res => {
        if (res.code === 0) {
          res.data.forEach(item => {
            this.saleDetails.map(res => {
              if (item.fmaterialId === res.fmaterialId) {
                res.sumInvQty = item.sumInvQty
              }
            })
          })
        }
      })
    },
    // 表格删除行
    handleDelete(index) {
      this.saleDetails.splice(index, 1)
    },
    // 新增行
    newLine() {
      const rate = this.saleDetails[0].ftaxRate
      const data = {
        fqty: 0,
        fmodel: '',
        fpaezText1: '',
        funit: '',
        fmaterialId: 0,
        fspecificaTion: '',
        funitId: 0,
        fstockQty: 0,
        sumInvQty: 0,
        fprice: 0,
        ftaxPrice: 0,
        ftaxRate: rate,
        fdescripTion: '',
        fdeliveryDate: new Date(),
        fnumber: '',
        fentryId: 0,
        fstockUnitId: 0
      }
      this.saleDetails.push(data)
    },
    // 选中行
    rowClick(row) {
      this.indexSelf = row.index
    },
    // 删除行
    delHang() {
      this.saleDetails.splice(this.indexSelf, 1)
    },
    // 点击单元格
    cellClick(row, column, cell, event) {
      this.property = column.property
      this.subscript = row.index
    },
    // 批量填充
    batchFill() {
      const item = this.saleDetails[this.subscript][this.property]
      this.saleDetails.map((res, index) => {
        if (index >= this.subscript) {
          res[this.property] = item
        }
      })
    },
    // 点击tabs
    handleClick(tab) {
      if (tab.name === 'log') {
        this.$refs.log.otherlog()
      }
    }
  }
}
</script>
<style scoped lang="scss">
.editPurchase {
  @include listBom;
  padding: 10px;
  .tabs{
    &::v-deep .el-tabs__content {
      min-height: calc(100vh - 180px)
    }
  }
  .el-input::v-deep .el-input__inner {
    height: 30px;
    line-height: 30px;
  }
  .el-tabs {
    &::v-deep.el-tabs__header {
      margin: 0 0 5px;
    }
    .el-form {
      display: flex;
      flex-wrap: wrap;

      .el-form-item {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        height: 35px;
        width: 275px;
        min-width: 246px;
        margin-bottom: 5px;
        .btnType{
          margin-right: 20px;
        }
        .el-date-editor.el-input{
          width: 100% !important;
        }
        .el-select{
          width: 100%;
        }
      }
    }
  }
}

.el-input__icon {
  cursor: pointer;
}

</style>
